class RFM50Test
{
    public final static int ON       = 0;
    public final static int OFF      = 1;
    
    public LedManager ledManager = new LedManager();
    public byte[] arrayOfByte;

    public void main(String[] args) 
    {
        //int pn = RFM50.GetPartNumber();
        arrayOfByte = new byte[256];
        for(int i=0;i<256;i++)
            arrayOfByte[i] = (byte)i;
        RFM50.ProcessBytes(arrayOfByte);
        while(true)
        {
            ledManager.LedOn(RFM50.LED1);
            RFM50.Led(RFM50.LED2,OFF);
            RFM50.Wait(1000);
            RFM50.Led(RFM50.LED1,OFF);
            RFM50.Led(RFM50.LED2,OFF);
            RFM50.Wait(1000);
            
            // put the processor to sleep
            RFM50.SetPowerMode(RFM50.SLEEP);
            
            // when we get here, the processor has woken up because of an even
            int result = RFM50.GetWakeUpReason();
            
            //switch(result)
            //{
                //case RFM50.WAKEONWATCHDOG:
                //RFM50.Led(RFM50.LED2,OFF);
                //break;
            //}
        }
    }
}